﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProLinq.Tests.Helpers.Visitors;

namespace ProLinq.Tests.Helpers
{
	static class ExpressionExtensions
	{
		public static Boolean FindConstant(this Expression expression, Object constant)
		{
			var finder = new ConstantFinder(5);
			finder.Visit(expression);
			return finder.Found;
		}
	}
}
